package GUI;

import java.awt.Graphics;

import javax.swing.JFrame;

import stochastic.SimulatedAnealing;

public class GUISimulatedAnneling extends JFrame {
	protected GUIPane p;
	public GUISimulatedAnneling(SimulatedAnealing alg) {
		
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		p = new GUIPane(alg);
		p.setOpaque(true);
		setContentPane(p);
		pack();
		setVisible(true);
		this.setSize(640,480);
	}
	
	public void setVisualizer(IVizualizer v) {
		p.vizualizer.setVisualizer(v);
	}
	
	public void paint(Graphics g) {
		super.paint(g);
		p.vizualizer.update(p.vizualizer.getGraphics());
	}
}
